package cn.iocoder.yudao.module.erp.controller.admin.contract.contractfilerelation.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 合同文件关联 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ContractFileRelationRespVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6049")
    @ExcelProperty("主键ID")
    private Long id;

    @Schema(description = "关联的合同ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21054")
    @ExcelProperty("关联的合同ID")
    private Long contractId;

    @Schema(description = "关联的文件表ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "214")
    private Long infraFileId;

    @Schema(description = "文件类别(合同正本/合同附件/补充协议/验收报告等)", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "文件类别(合同正本/合同附件/补充协议/验收报告等)", converter = DictConvert.class)
    @DictFormat("file_category") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String fileCategory;

    @Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @ExcelProperty("文件名称")
    private String fileName;

    @Schema(description = "文件格式(pdf/doc/xls等)", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("文件格式(pdf/doc/xls等)")
    private String fileFormat;

    /*@Schema(description = "文件大小(字节)", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("文件大小(字节)")
    private Long fileSize;*/

    @Schema(description = "在线预览URL", example = "https://www.iocoder.cn")
    @ExcelProperty("在线预览URL")
    private String previewUrl;

    @Schema(description = "下载URL", example = "https://www.iocoder.cn")
    @ExcelProperty("下载URL")
    private String downloadUrl;

    @Schema(description = "文件备注说明", example = "你猜")
    @ExcelProperty("文件备注说明")
    private String fileRemark;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "创建人", example = "张三")
    private String creator;

}